<%@page import="com.cdshop.dao.UserDAO,com.cdshop.web.PageUtil"%>
<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String unique = request.getParameter("unique");
	if (unique != null) {
		String name = request.getParameter("name");
		boolean ret = true;
		if ("username".equals(name)) {
			ret = UserDAO.instance().validteUsernameUnique(unique);
		} else if ("email".equals(name)) {
			ret = UserDAO.instance().validteEmailUnique(unique);
		}
		response.setContentType("text/json");
		out.write(PageUtil.json().add("ret",ret).value());
		out.flush();
	}
%>